<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用公共文件
//use think\Session;
//function Indexlogin()
//{
//	$name=Session::has('m_name');
//	//echo $name;die;
//	$url=url('index/index/login');
//	if(!$name)
//	{
//		header('Location:'.$url);
//		die;
//	}
//}
function arrayPage($arr,$count=10,$page=1)
{
    $sum=count($arr);//总条数
    $pagesum=ceil($sum/$count);//总页数
    $start=($page-1)*$count;//开始条数
    $arr1=array_slice($arr,$start,$count);
    //$arr1['pagesum']=$pagesum;
    return $arr1;
}
